package com.example.mybatisplus.controoller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.mybatisplus.pojo.User;
import com.example.mybatisplus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("find")
    public IPage<User> find(Integer maxAge, Integer minAge, String address, @RequestParam(defaultValue = "1") Integer currentPage) {
        return userService.find(maxAge, minAge, address, currentPage);
    }

    @GetMapping("delete")
    public  void dele(){}
}